Repository navigation
Resume reviews automatically after a history rewrite - #114
Merged
Merged
Conversation
An interrupted review keeps its captured stack. When a rewrite removes those commits and leaves no lineage, no current stack continues the attempt, so a review can neither reopen the saved range nor select a replacement for it. The attempt then stops every review with a recovery choice that has no working answer, and nothing ever removes it because cleanup only covered stacks that a fixup commit extended. Cleanup now drops an unfinished attempt whose captured commits no current stack continues, and the saved sessions of the stack versions it drops. The review then starts on the current stacks, and recovery is offered only for a range that a review can actually reopen.
Approval refused any attempt that still looked active, asking the user to recover or replace it. For an attempt whose captured commits a rewrite removed, both choices are impossible, so the stack could never be approved and status kept reporting the dead attempt as active. An attempt that no review can reopen is no longer active, so approval, automatic review, feedback listings, and status all ignore it. The next review discards it.
A session document lives in a store whose index names it. A later change moves a session to another commit range, which needs the store as well as the document, so record the store beside the path that the reader already reports. The field is not serialized. Change-Id: Iab01f2030d6a2a2089da96644a9c6482457c2553
tuicr keeps a session only for the exact commit range that a review shows, so a rebase or a reword discarded the reviewer's marks and comments even when the patch was identical. The human then had to review the same patch again, and the attempt that Timber recorded described a range that no review could reopen. A review now moves the session of a reviewed patch onto the current stack before it starts: the files, marks, comments, and content hashes stay, the commit-message entry follows the new tip, and a reworded message drops its mark and its comments so the message is read again. Only a matching patch carries, so no mark ever describes content that changed. Carrying is best effort, because the store belongs to tuicr: an unreadable or unexpected document warns and leaves a fresh review. Change-Id: Ic1634260e2004f026ac407b5fb2a2dc910931789
An interrupted review asked the user to recover or replace it, and after a rewrite neither answer could open the captured range: recovery showed commits that no longer exist and replacement refused to start. The question was also unnecessary in the common case, where resuming is the only sensible answer. A review now resumes the attempt that captured the same stack, and it starts a new attempt on the current stack otherwise, which the previous change already carries the saved review onto. The --recover and --replace flags, the prompt, the decision result, and the decision_required status are removed, so a review either runs or reports its outcome. Change-Id: Ie52af4a26a36c18d09ef0a8563864d5795f8928d
A review that resumes automatically needs an explicit way to start over, and a state that no command can change is the trap that a rewrite used to create. Reset clears the attempts and saved sessions of one stack, selected by a commit or by inclusive commit_stack endpoints, or of every stack in the feature range when it has no argument. It holds the review lock, so it cannot clear state under a live review, and both views then agree on an empty state. Change-Id: I5bf34c0e32e3c9e0710cc5999405c2c852e88be1
The skill told agents that recovery needs the user's choice and that --recover exists. Both are gone: a review resumes the attempt that captured the same stack, a matching patch carries its saved review onto rewritten commits, and reset clears the state when the user wants a clean start. Change-Id: I228617b704eeaece0b4639f41cf1967a2ee47e20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.